import java.util.Scanner;

public class Calculator {


    public void show() {
        System.out.println("欢迎使用小不点计算器：");
        Scanner input = new Scanner(System.in);
        String answer = null;
        do {

            System.out.println("请输入第1个运算数字:");
            int num1 = input.nextInt();
            System.out.println("请输入要计算的运算符：（1、+ 2、- 3、* 4/）");
            int num2 = input.nextInt();
            System.out.println("请输入第2个运算数字:");
            int num3 = input.nextInt();
            switch (num2) {

                case 1:
                    System.out.println(num1 + "+" + num3 + "=" + (num1 + num3));
                    break;
                case 2:
                    System.out.println(num1 + "-" + num3 + "=" + (num1 - num3));
                    break;
                case 3:
                    System.out.println(num1 + "x" + num3 + "=" + (num1 * num3));
                    break;
                case 4:
                    System.out.println(num1 + "/" + num3 + "=" + (num1 / num3));
                    break;
                default:
                    System.out.println("你输入的运算符有问题");
                    break;
            }


            System.out.println("是否要继续使用？（y/n）");
            answer = input.next();
        } while (!"n".equals(answer));
        System.out.println("程序运行结束!");
    }
}
